Skip to main content

A framework for machine learning on Apple silicon.

Project description

MLX

Quickstart | Installation | Documentation | Examples

CircleCI

MLX is an array framework for machine learning on Apple silicon, brought to you by Apple machine learning research.

Some key features of MLX include:

  • Familiar APIs: MLX has a Python API that closely follows NumPy. MLX also has fully featured C++, C, and Swift APIs, which closely mirror the Python API. MLX has higher-level packages like mlx.nn and mlx.optimizers with APIs that closely follow PyTorch to simplify building more complex models.

  • Composable function transformations: MLX supports composable function transformations for automatic differentiation, automatic vectorization, and computation graph optimization.

  • Lazy computation: Computations in MLX are lazy. Arrays are only materialized when needed.

  • Dynamic graph construction: Computation graphs in MLX are constructed dynamically. Changing the shapes of function arguments does not trigger slow compilations, and debugging is simple and intuitive.

  • Multi-device: Operations can run on any of the supported devices (currently the CPU and the GPU).

  • Unified memory: A notable difference from MLX and other frameworks is the unified memory model. Arrays in MLX live in shared memory. Operations on MLX arrays can be performed on any of the supported device types without transferring data.

MLX is designed by machine learning researchers for machine learning researchers. The framework is intended to be user-friendly, but still efficient to train and deploy models. The design of the framework itself is also conceptually simple. We intend to make it easy for researchers to extend and improve MLX with the goal of quickly exploring new ideas.

The design of MLX is inspired by frameworks like NumPy, PyTorch, Jax, and ArrayFire.

Examples

The MLX examples repo has a variety of examples, including:

Quickstart

See the quick start guide in the documentation.

Installation

MLX is available on PyPI. To install the Python API, run:

With pip:

pip install mlx

With conda:

conda install -c conda-forge mlx

Checkout the documentation for more information on building the C++ and Python APIs from source.

Contributing

Check out the contribution guidelines for more information on contributing to MLX. See the docs for more information on building from source, and running tests.

We are grateful for all of our contributors. If you contribute to MLX and wish to be acknowledged, please add your name to the list in your pull request.

Citing MLX

The MLX software suite was initially developed with equal contribution by Awni Hannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. If you find MLX useful in your research and wish to cite it, please use the following BibTex entry:

@software{mlx2023,
  author = {Awni Hannun and Jagrit Digani and Angelos Katharopoulos and Ronan Collobert},
  title = {{MLX}: Efficient and flexible machine learning on Apple silicon},
  url = {https://github.com/ml-explore},
  version = {0.0},
  year = {2023},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mlx-0.26.3-cp313-cp313-manylinux_2_31_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.31+ x86-64

mlx-0.26.3-cp313-cp313-macosx_15_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

mlx-0.26.3-cp313-cp313-macosx_14_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

mlx-0.26.3-cp313-cp313-macosx_13_0_arm64.whl (34.0 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64

mlx-0.26.3-cp312-cp312-manylinux_2_31_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

mlx-0.26.3-cp312-cp312-macosx_15_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

mlx-0.26.3-cp312-cp312-macosx_14_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

mlx-0.26.3-cp312-cp312-macosx_13_0_arm64.whl (34.0 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

mlx-0.26.3-cp311-cp311-manylinux_2_31_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

mlx-0.26.3-cp311-cp311-macosx_15_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

mlx-0.26.3-cp311-cp311-macosx_14_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

mlx-0.26.3-cp311-cp311-macosx_13_0_arm64.whl (34.0 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

mlx-0.26.3-cp310-cp310-manylinux_2_31_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

mlx-0.26.3-cp310-cp310-macosx_15_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

mlx-0.26.3-cp310-cp310-macosx_14_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

mlx-0.26.3-cp310-cp310-macosx_13_0_arm64.whl (34.0 MB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

mlx-0.26.3-cp39-cp39-manylinux_2_31_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

mlx-0.26.3-cp39-cp39-macosx_15_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

mlx-0.26.3-cp39-cp39-macosx_14_0_arm64.whl (33.3 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

mlx-0.26.3-cp39-cp39-macosx_13_0_arm64.whl (34.0 MB view details)

Uploaded CPython 3.9macOS 13.0+ ARM64

File details

Details for the file mlx-0.26.3-cp313-cp313-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp313-cp313-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 c435d90d367be56173f7c98abbf658f3d61e5bf64a801094e0c0c239db5a1498
MD5 42b303ccc70bf1015f32b3b15c4db87c
BLAKE2b-256 4a6eb64d31616cabc24073e6f8b1250ca5bb0c930e275cc8c1e4a5d039b5bbb1

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 84e2aa1414463d4fd21a18339eda37a52725d7df7e8496a1dfb49feb57898097
MD5 8c11e96513ad74f35da48de94a2ec962
BLAKE2b-256 e88715d98f0354f2a2022c5606a17f10cee62f558f98ec1308a49b50d838da44

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f800afe89512581e4a56f29382d3baed70b52708f32fcc213574bdddac725642
MD5 a6e3fd182241bff44630300a414e1d47
BLAKE2b-256 7eabebcd556b470b776c4f97abdc2f7418921dd49a1d69418f733ce2a9e427f2

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp313-cp313-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 6895cdfbfc79225cc6e6a9ef06c2175124afe16ff5cdba9fa540bbb3450b4fc9
MD5 89804ae2f919611b755168a7005edd67
BLAKE2b-256 8a4a252ea27179c3733d099d5fef51cf1a3ae4da5ba0cf78f031b631b02bd380

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 992a208a05f570f1b1d4655100149c2f4aeb56a1b94874ae5d2fb8b7b87440d3
MD5 8d79e283b54aedd84b1b4bffbe9f8163
BLAKE2b-256 a251313a16bd2a67758051cf1a18361d3bfe57f4ec99bc9328380198350e3f54

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 63f8ff01abb933a04e44f0f2efe98c58fc7d3311e5863ea554a5858b69ac2a07
MD5 4647a51c20ec4cb65ef393598b30eec8
BLAKE2b-256 02c61e344830ac1e46b5b456a8fa8d1455f8ee2c312e0df083f4093f6c7dc532

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4ba6fe10d68568b6cec5e781f6f0674be89cc99bf3182da9130bb29b80a32392
MD5 d190735d74340136ce0cd47da9b754be
BLAKE2b-256 82730e13eb88baa4f87b70a802e0eb935edb27a52bddc1952df05fcb7a6f4d60

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 e01b0f21bb2f38edd2be9e51db0e71b1bd74f8656fcb7571247255d1686e5ccb
MD5 7cd0709cd6a1f0e44ca1049d0259223a
BLAKE2b-256 26bf68deb588bc0cbb48f66f965202439bff3648fc6b8fc3798b317840c06b59

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 f3cb4c0da3636d1b79b761316e442bf3133aba0f17edbb4fa625bfdc23d99642
MD5 d716d8be470c4c903f26fcce0aaa4a8c
BLAKE2b-256 89525dddad2c1f5c7d8f25e847abd8ff79b306c82421444b95557755c8b2608e

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8a0927dcc26c667234a5a8b1152919cfba9dbcf29eea4450f98b205fb005ecd6
MD5 0fb3ff716652efc528d8a041cbcd5bf0
BLAKE2b-256 315bb3591ad2c086d139ae0ad325bdea5d56553d7325c146b2ad57b67c29fe4b

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 82f81c3fcd0b4f2088faf1327fc6ce2bafb0f45ded00b08f46716ab29929bd9c
MD5 2716cf7f498642c6d0ad0bc72ffff5ab
BLAKE2b-256 ea70ece973ace5298ab095bf8967f3d9565a92a3aa81d106eacd3e0f4e365f77

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 86662a10528a0d09bd604aa3385432260af56c57a0dbdaf87d4fea9d67860bbb
MD5 4ca83415ff5ca240d93a9aa4ae501f23
BLAKE2b-256 8309d378fe2bbbf62e6ac1f9b994f43116e5710362e6b627119082a95aa15645

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp310-cp310-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 2ac692f73b98d89a1faefe789a6f5432cbc6d3ad2b412e3a8087e82bbb9c19f4
MD5 a71ccf237e7c54a13d29a28869fe7536
BLAKE2b-256 0d314430f53a25d2e408d88ea9fe2820e94de1a78ca5713ef95e8329a7b8b54b

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4407ce0f3fdea3575a2158f750d70c767a775bec23755119bafb76dd5a66e89c
MD5 5b5bdba42c2fb1c99f1a1004cbd1ad2d
BLAKE2b-256 34a67624cfb04893706f20ab044c810109caf3e32b4a454476492ccd0ff55590

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 6c87dcc5497847934d95e5da31b4cc63e7f6ec055e0b2d76ea168f18386ef67c
MD5 26b77ef59d8b9786034f05cef9eee92a
BLAKE2b-256 53f0b35605ee4e8b108ed33c5f7ef1aa8d2867f79dd4a687fda104757379d864

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 97a8d0632507007257e2aafb91fd2389da089be6ae70100a6aa70cf3a4dd2fee
MD5 9b3640459e9afc439fa5f913b10fb46f
BLAKE2b-256 d1e3bc87cdcb9ce1dc5971bdcfbfa9dbc23aaebb0017cc3213ff806a0da4ca42

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp39-cp39-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mlx-0.26.3-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 2fef32ad7f887b35e616c9762d66ca25288807fb4ec506e19087e473e045f50e
MD5 1b5ea6ebc9a285ab826fc40030cffc7c
BLAKE2b-256 9b9d48387380f3c808abcfc5d1daa39462c9df74a344f17d9e3a9c7c49bdef57

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: mlx-0.26.3-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 33.3 MB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for mlx-0.26.3-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8b075d98e14b90b168ca2387924de33ac495756278fe7c8d93050dd153bc7016
MD5 a17514219dc4be4933a65757da909caf
BLAKE2b-256 af914472693b3387c56ebe2ad0f290f60d729c4b8a330229432151204438f67b

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

  • Download URL: mlx-0.26.3-cp39-cp39-macosx_14_0_arm64.whl
  • Upload date:
  • Size: 33.3 MB
  • Tags: CPython 3.9, macOS 14.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for mlx-0.26.3-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 537989246022453bcdc992b73240150a1f308a6d6e35faa412ca73188b343966
MD5 0223784ba8eeebff7ddc45689ed181a3
BLAKE2b-256 55ad22bacaa3e3cf2c8e8d5c2988ee7ca8270bfcfaac2306e9d2a6808b13e4f6

See more details on using hashes here.

File details

Details for the file mlx-0.26.3-cp39-cp39-macosx_13_0_arm64.whl.

File metadata

  • Download URL: mlx-0.26.3-cp39-cp39-macosx_13_0_arm64.whl
  • Upload date:
  • Size: 34.0 MB
  • Tags: CPython 3.9, macOS 13.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for mlx-0.26.3-cp39-cp39-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 bcb89981793e38bdc3b2e32de1d1b60fd78349492497e0a047627d86e7c9eb48
MD5 ad3a805ae352f31403e0781beb4aec6c
BLAKE2b-256 605229c196d31f640403f8adeab113b0690fa31e63080b1e86eeef9d84ffe821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page